package com.xdemo.community.manager;

import java.util.HashMap;
import java.util.Map;

import com.xdemo.server.ServerSource;

public class PersonalServerManager implements IPersonalServerManager {
	
	private Map<String,ServerSource> personalServers = new HashMap<String,ServerSource>();
	
	@Override
	public void registerServer(String serverId,ServerSource server) {
		this.personalServers.put(serverId, server);
		server.setServerId(serverId);
	}

	@Override
	public void breakServer(String serverId) {
		ServerSource _server = this.personalServers.remove(serverId);
		if(_server != null) {
			_server.setServerId(null);
		}
	}

	@Override
	public void start() {
		
	}

	@Override
	public void stop() {
		
	}

}
